<?php

function login($usr, $pwd){
	$response=new WsResponse();	
	if (session_login($usr,$pwd)){
		$response->setStatusCode("0");
		$response->setStatusMessage("Session established");		
	}else{
		$response->setStatusCode("-1");
		$response->setStatusMessage("Bad login");				
	}
	echo($response->toXml());
}

function logout(){
	session_logout();
	$response=new WsResponse();	
	$response->setStatusCode("0");
	$response->setStatusMessage("Session logged out");
	echo($response->toXml());
}
?>
